#include <iostream>
#include <vector>
#include <queue>

using namespace std;

class Solution
{
public:
    long long repairCars(vector<int> &ranks, int cars)
    {
        
    }
};

int main()
{
    cout << "Code2594" << endl;
    Solution s;
    vector<int> ranks = {4, 2, 3, 1};
    int cars = 10;
    cout << s.repairCars(ranks, cars) << endl;
    return 0;
}

/*
time overloper a little
class Solution
{
public:
    long long repairCars(vector<int> &ranks, int cars)
    {
        // <ct_unApply,r,n>
        priority_queue<tuple<long long, int, int>, vector<tuple<long long, int, int>>, greater<tuple<long long, int, int>>> pq;
        for (int i = 0; i < ranks.size(); i++)
        {
            pq.push(make_tuple(ranks[i], ranks[i], 1));
        }
        long long maxTime = 0;
        for (int i = 0; i < cars; i++)
        {
            auto [ct_unApply, r, n] = pq.top();
            pq.pop();
            maxTime = max(maxTime, ct_unApply);
            n++;
            ct_unApply = static_cast<long long>(r) * n * n;
            pq.push(make_tuple(ct_unApply, r, n));
        }
        return maxTime;
    }
};
*/